home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gCurrentPos, gNbItem
- set Delta to the mouseV - the locV of sprite 27
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- set CurrentP to getAt(gCurrentPos, 3)
- repeat while the mouseDown
- if rollOver(26) and (TempV2 <> the mouseV) then
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- if TempV > (SpriteBottom(26) - (SpriteHeight(27) / 2)) then
- set the locV of sprite 27 to SpriteBottom(26) - (SpriteHeight(27) / 2)
- else
- if TempV < (SpriteTop(26) + (SpriteHeight(27) / 2)) then
- set the locV of sprite 27 to SpriteTop(26) + (SpriteHeight(27) / 2)
- else
- set the locV of sprite 27 to TempV
- end if
- end if
- updateStage()
- set Percent to (the locV of sprite 27 - SpriteTop(26) - (SpriteHeight(27) / 2)) / ((SpriteHeight(26) - SpriteHeight(27)) * 1.0)
- if Percent >= 1 then
- setAt(gCurrentPos, 3, getAt(gNbItem, 3) - 5)
- else
- if Percent = 0 then
- setAt(gCurrentPos, 3, 1)
- else
- setAt(gCurrentPos, 3, integer(Percent * (getAt(gNbItem, 3) - 6)) + 1)
- end if
- end if
- if getAt(gCurrentPos, 3) <> CurrentP then
- set CurrentP to getAt(gCurrentPos, 3)
- SetWindow2(3, 14)
- end if
- end if
- end repeat
- ActiveField(3)
- end
-